package com.ruyuan.o2o.groupbuy.common;

import java.text.SimpleDateFormat;

/**
 * 时间工具类
 *
 * @author ming qian
 */
public class TimeUtil {
    public static synchronized String format(Long time) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(time);
    }

    public static synchronized String formatExcel(Long time) {
        SimpleDateFormat sdfExcel = new SimpleDateFormat("yyyy-MM-dd");
        return sdfExcel.format(time);
    }
}
